#ifndef __CONTENT_HPP__
#define __CONTENT_HPP__

#include <cstdint>
#include <fstream>
#include <string>

using namespace std;

class content_t
{
	public:
	content_t();
	uint32_t pos;
	uint32_t cid;
	uint16_t index;
	uint16_t type;
	uint64_t len;
	uint8_t hash[20];
	
	bool open(ifstream& wadstream, uint32_t tmdpos, uint32_t contentpos);
	bool unpack(ifstream& wadstream, string path, uint8_t* titlekey = NULL);
};

#endif //__CONTENT_HPP__
